1. Technical Field
The present invention relates generally to interaction between data processing system operating systems and in particular to input/output data transactions between an operating system and storage hardware within a data processing system. Still more particularly, the present invention relates to software configuration of hardware to conform to different operating system data structures for input/output transactions.
2. Description of the Related Art
Every operating system employs a different data structure to represent an input/output (I/O) request to an independent, standard architecture I/O subsystem such as Small Computer Serial Interface (SCSI), Peripheral Component Interconnect (PCI), fiber channel and the like. However, each data structure typically contains common data for a given I/O class, varying only in organization. For example, all SCSI I/O requests include a SCSI Command Descriptor Block (CDB), a target identifier (ID) and Logical Unit Number (LUN), a scatter/gather list for data transfer, etc.
For example, the SCSI data structures employed by the Windows NT.TM. operating system available from Microsoft Corporation of Redmond Washington includes an I/O request ("SCSI_REQUEST_BLOCK") data structure defined as follows:
typedef struct_SCSI_REQUEST_BLOCK { /* Offset */ USHORT Length; /* 0x00 */ UCHAR Function; /* 0x02 */ UCHAR SrbStatus; /* 0x03 */ UCHAR ScsiStatus; /* 0x04 */ UCHAR PathId; /* 0x05 */ UCHAR TargetId; /* 0x06 */ UCHAR Lun; /* 0x07 */ UCHAR QueueTag; /* 0x08 */ UCHAR QueueAction; /* 0x09 */ UCHAR CdbLength; /* 0x0A */ UCHAR SenseInfoBufferLength; /* 0x0B */ ULONG SrbFlags; /* 0x0C */ ULONG DataTransferLength; /* 0x10 */ ULONG TimeOutValue; /* 0x14 */ PVOID DataBuffer; /* 0x18 */ PVOID SenseInfoBuffer; /* 0x1C */ struct_SCSI_REQUEST_BLOCK *NextSrb; /* 0x20 */ PVOID OriginalRequest; /* 0x24 */ PVOID SrbExtension; /* 0x28 */ ULONG QueueSortKey; /* 0x2C */ UCHAR Cdb[16]; /* 0x30 */ } SCSI_REQUEST_BLOCK, *PSCSI_REQUEST_BLOCK;
The data structure above has been annotated with the offsets employed by the operating system in order to make the data more understandable. The offsets given are from the beginning of the data structure and are expressed in hexadecimal.
A corresponding device data structure for a SCSI controller available from LSI Logic, Inc. of Milpitas, Calif. is as follows:
 typedef struct_SVDT /* Offset */ { SVDT_CONTEXT Context; /* 0x00 */ SALI_UINT32 CumulativeByteCount; /* 0x04 */ SALI_UINT32 PhyPtrDataMove; /* 0x08 */ SALI_UINT32 SavedDataPointer; /* 0x0C */ SALI_UINT32 Reserved; /* 0x10 */ SALI_UINT8 TargetId; /* 0x14 */ SALI_UINT8 TargetLun; /* 0x15 */ SALI_UINT8 DwtFlags; /* 0x16 */ SALI_UINT8 ReservedFlag; /* 0x17 */ DSA_TABLE_SELECTION_ENTRY DeviceDescriptor; /* 0x18 */ SALI_UINT8 Reserved1; /* 0x18 */ SALI_UINT8 Sxfer; /* 0x19 */ SALI_UINT8 TargetId; /* 0x1A */ SALI_UINT8 Scnt13; /* 0x1B */ DSA_TABLE_MOVE_ENTRY MsgOutBufDescriptor; /* 0x20 */ SALI_UINT32 ByteCount; /* 0x20 */ SALI_PHYSCIAL_ADDRESS PhyPtrBuffer; /* 0x24 */ DSA_TABLE_MOVE_ENTRY CdbBufDescriptor; /* 0x28 */ SALI_UINT32 ByteCount; /* 0x28 */ SALI_PHYSCIAL_ADDRESS PhyPtrBuffer; /* 0x2C */ DSA_TABLE_MOVE_ENTRY StatusBufDescriptor; /* 0x30 */ SALI_UINT32 ByteCount; /* 0x30 */ SALI_PHYSCIAL_ADDRESS PhyPtrBuffer; /* 0x3C */ } SVDT, * PTR_SVDT;
The differences between the operating system data structure and the hardware data structure must be resolved in order for the operating system to perform I/O transactions with the hardware. Normally, software drivers for an I/O sub-system running within the operating system will translate the operating system data structure for I/O transactions from the operating system format to a hardware specific format. Data within the I/O transaction data structure is rearranged to be understandable to the I/O subsystem hardware.
For instance, in order to allow the Windows operating system to perform I/O operations with the LSI Logic SCSI controller with the above-described data structures, the operating system device driver must copy the request data from the NT data structure SCSI_REQUEST_BLOCK to the LSI Logic hardware data structure SVDT. The data copied in this example might include:
 Source data Destination data ScsiStatus StatusBufDescriptor.PhyPtrBuffer address TargetId DeviceDescriptor.TargetId Lun to Message out buffer byte 0 QueueTag to Message out buffer byte 2 QueueAction to Message out buffer byte 1 CdbLength CdbBufDescriptor.ByteCount SrbFlags DwtFlags DataTransferLength CumulativeByteCount DataBuffer PhyPtrDataMove Cdb [16] CdbBufDescriptor.PhyPtrBuffer address
This software translation is a time consuming process requiring significant processor and system resources to be expended. Translation is required only because the hardware and operating system data structures are incongruent and the hardware cannot be configured to directly understand the operating system data structure. The requirement for data structure translation compels processor utilization for I/O transactions and poses a limiting factor on I/O throughput.
It would be desirable, therefore, to eliminate the overhead required for translation of I/O transaction data structures during operation of a data processing system. It would further be advantageous for the mechanism eliminating the translation overhead to remain capable of configuration for compatibility with various hardware data structures for a given I/O architecture.